<%@ include file="../common/top.jsp" %>
<div id="BackLink">
  <a href="mainForm">Return to Main Menu</a>>
</div>
<div id="BackLink">
  <a href="editAccount">Return to My Account</a>>
</div>

<div id="Catalog">
<div align="center">
  <h2>My Orders</h2>

  <table>
    <tr>
      <th>Order ID</th>
      <th>Date</th>
      <th>Total Price</th>
    </tr>

    <c:forEach var="order" items="${sessionScope.orderList}">
      <tr>
        <td>
          <a href="viewOrder?orderId=${order.orderid}">${order.orderid}</a>
        </td>
        <td><fmt:formatDate value="${order.orderDate}"
                            pattern="yyyy/MM/dd"/></td>
        <td><fmt:formatNumber value="${order.totalprice}"
                              pattern="$#,##0.00"/></td>
      </tr>
    </c:forEach>

  </table>
</div>
</div>
<%@ include file="../common/bottom.jsp" %>
